home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / source.exe / POSIX / LS / BSTAT.C next >
C/C++ Source or Header  |  1992-10-29  |  445b  |  28 lines

  1. #include <sys/types.h>
  2. #include <sys/stat.h>
  3.  
  4. /*
  5.  * Lstat: Posix Implementation DF_AJ
  6.  */
  7.  
  8. int bstat (const char *path, struct stat *buf)
  9. {
  10.     register int result;
  11.  
  12. #if 0
  13. puts("in lstat");
  14. #endif
  15.     result = stat(path, buf);
  16. #if 0
  17. printf("mode %lo\n", (unsigned long) buf->st_mode);
  18. #endif
  19.     if ( S_ISDIR(buf->st_mode) ) {
  20. #if 0
  21. puts ("is dir");
  22. #endif
  23.         if ( !buf->st_size ) 
  24.             buf->st_size = 16000;
  25.     }
  26.     return result;
  27. }
  28.